// 服务器配置文件
// 统一管理所有服务器相关的IP和端口配置

const serverConfig = {
  // 服务器IP配置
  host: '192.168.1.101',
  
  // RTMP相关配置
  rtmp: {
    port: 1935,
    baseUrl: function() {
      return `rtmp://${serverConfig.host}:${this.port}`;
    },
    liveUrl: function() {
      return `${this.baseUrl()}/live`;
    },
    streamUrl: function() {
      return `${this.liveUrl()}/stream`;
    },
    stream1Url: function() {
      return `${this.liveUrl()}/stream1`;
    },
    stream2Url: function() {
      return `${this.liveUrl()}/stream2`;
    },
    stream3Url: function() {
      return `${this.liveUrl()}/stream3`;
    }
  },
  
  // HTTP相关配置
  http: {
    port: 8000,
    baseUrl: function() {
      return `http://${serverConfig.host}:${this.port}`;
    }
  },
  
  // API相关配置
  api: {
    port: 8001,
    baseUrl: function() {
      return `http://${serverConfig.host}:${this.port}`;
    }
  }
};

export default serverConfig; 